package sy.model;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lichenhao on 2017/3/30.
 */
@Entity
@Table(name = "transport")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Ttransport implements java.io.Serializable {
	private String id;
	private String code;
	private String docId;
	private String status;

	//海运（SEA）、空运（SKY）、陆运（LAND）
	private String type;

	//创建日期
	private Date createTime;

	//货主
	private Tstorer owner;
	//运输商
	private Tstorer carrier;
	//仓库
	private Tstorer factory;

	//收货地址
	private String address;

	//订单备注
	private String orderRemark;

	//发货日期
	private Date sendTime;
	//发货标识（车牌号）
	private String sendNo;
	//发货备注
	private String sendRemark;
	//是否发送邮件
	private boolean isSend;

	//到货日期
	private Date receiveTime;
	//收货方式
	private String receiveType;
	//到货备注
	private String receiveRemark;

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getSendRemark() {
		return sendRemark;
	}

	public void setSendRemark(String sendRemark) {
		this.sendRemark = sendRemark;
	}

	public Date getReceiveTime() {
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	public String getReceiveRemark() {
		return receiveRemark;
	}

	public void setReceiveRemark(String receiveRemark) {
		this.receiveRemark = receiveRemark;
	}

	@Id
	@Column(name = "ID", nullable = false, length = 36)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "OWNERID")
	public Tstorer getOwner() {
		return owner;
	}

	public void setOwner(Tstorer owner) {
		this.owner = owner;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CARRIERID")
	public Tstorer getCarrier() {
		return carrier;
	}

	public void setCarrier(Tstorer carrier) {
		this.carrier = carrier;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FACTORYID")
	public Tstorer getFactory() {
		return factory;
	}

	public void setFactory(Tstorer factory) {
		this.factory = factory;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getOrderRemark() {
		return orderRemark;
	}

	public void setOrderRemark(String orderRemark) {
		this.orderRemark = orderRemark;
	}

	public String getSendNo() {
		return sendNo;
	}

	public void setSendNo(String sendNo) {
		this.sendNo = sendNo;
	}

	public boolean isSend() {
		return isSend;
	}

	public void setSend(boolean send) {
		isSend = send;
	}

	public String getReceiveType() {
		return receiveType;
	}

	public void setReceiveType(String receiveType) {
		this.receiveType = receiveType;
	}

	public String getDocId() {
		return docId;
	}

	public void setDocId(String docId) {
		this.docId = docId;
	}
}
